package SuperKeyWord;

/**
 * @author Jimmy
 * @date 2022/11/14 - 18:58
 */
public class AccountTest {
    public static void main(String[] args) {
        Account a1 = new Account(1011, 20000, 0.045);
        a1.withdraw(30000);
        System.out.println(a1.getBalance());
        a1.withdraw(2500);
        a1.deposit(3000);
        System.out.println(a1.getBalance());
        System.out.println(a1.getMonthlyInterest());
        System.out.println("******************************************");

        CheckAccount c1 = new CheckAccount(1122, 20000, 0.045, 5000);
        c1.withdraw(5000);
        System.out.println(c1.getBalance() + "\t" + c1.getOverdraft());
        c1.withdraw(18000);
        System.out.println(c1.getBalance() + "\t" + c1.getOverdraft());
        c1.withdraw(3000);
        System.out.println(c1.getBalance() + "\t" + c1.getOverdraft());

    }
}
